//
//  TollEventTopView.m
//  Runone
//
//  Created by runone02 on 16/8/30.
//  Copyright © 2016年 runone. All rights reserved.
//

#import "TollEventTopView.h"

@interface TollEventTopView ()

@property (weak, nonatomic) IBOutlet UIImageView *iconVIew;
@property (weak, nonatomic) IBOutlet UILabel *tollStationLabel;
@property (weak, nonatomic) IBOutlet UILabel *EventTypeLabel;
@property (weak, nonatomic) IBOutlet UILabel *dutySquadLabel;
@property (weak, nonatomic) IBOutlet UILabel *timeLabel;
@property (weak, nonatomic) IBOutlet UILabel *EventDescriptionLabel;

@end

@implementation TollEventTopView

- (void)awakeFromNib {
    [super awakeFromNib];
}

+ (instancetype)tollEventTopView
{
    return [[[NSBundle mainBundle] loadNibNamed:NSStringFromClass(self) owner:nil options:nil] lastObject];
}

//dataValueString	__NSCFString *	@"{\"EventUID\":\"8a3e007e-9daf-4938-8fcd-84f59864a50b\",\"SystemUID\":\"4a22bbfd-428c-495c-9702-af5fb92c3973\",\"TollStationUID\":\"e5197f70-7eba-4dae-8046-d1126af7c4ab\",\"EventType\":0,\"DutyMonitor\":\"马蓉\",\"OccurTime\":\"2016-08-19 00:00:00\",\"EventDescription\":\"马蓉冲卡\",\"PicturesInfo\":null,\"VideoInfo\":null,\"RecordUserUID\":\"419c6bd7-cb02-4a03-a3a4-944289d50d7b\",\"RecordTime\":\"2016-08-19 09:18:12\",\"SystemCode\":\"GuangleHighway\",\"TollStationName\":\"坪石西收费站\",\"TollStationInfo\":null}"

- (void)setTollModel:(TollStationInfo *)tollModel andTollEventModel:(TollEvent *)model {
    self.tollStationLabel.text = tollModel.TollStationName;
    self.EventTypeLabel.text = [NSString stringWithFormat:@"事件类型：%ld",(long)model.EventType];
    self.EventDescriptionLabel.text = [NSString stringWithFormat:@"%@",model.EventDescription];
    self.dutySquadLabel.text = [NSString stringWithFormat:@"%@",model.DutyMonitor];
    self.timeLabel.text = model.OccurTime;
}

@end
